<?
include engine.'/classes/filesys.class.php';
//die(root);
//print_r($_POST);
$_POST['node']='/'.basename($_POST['node']);
if ($_POST['oldParent']!=$_POST['newParent']) {
	if ($_POST['oldParent']=='source') $_POST['oldParent']='';
	if ($_POST['newParent']=='source') $_POST['newParent']='';
	rename(root.$_POST['oldParent'].$_POST['node'],root.$_POST['newParent'].$_POST['node']);
	echo $_POST['newParent'].$_POST['node'];
}
?>
